package org.springblade.modules.platform.controller;


import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import org.springblade.modules.platform.dto.PhysicalDataTableDTO;
import org.springblade.modules.platform.dto.PhysicalDataTableListByPageDTO;
import org.springblade.modules.platform.service.IPhysicalValueTableService;
import org.springblade.modules.platform.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 物理数据表 前端控制器
 * </p>
 *
 * @author SYG
 * @since 2022-08-25
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/service-huateng-sxdb/physicalDataTable")
@Api(value = "物理量数据接口", tags = "物理量数据接口")
public class PhysicalDataTableController {

	private final IPhysicalValueTableService iPhysicalValueTableService;

	@ApiLog("分页")
	@GetMapping("/getListByPagev2")
	@ApiOperationSupport(order = 4)
	@ApiOperation(value = "分页", notes = "传入physicalDataTableListByPageDTO")
	public R<PhysicalValuePageVO> getListByPage(PhysicalDataTableListByPageDTO physicalDataTableListByPageDTO){
		return R.data(iPhysicalValueTableService.getListByPage(physicalDataTableListByPageDTO));
	}

	@ApiLog("基础物理量")
	@PostMapping("/basicsPhysical")
	@ApiOperationSupport(order = 4)
	@ApiOperation(value = "基础物理量", notes = "传入physicalDataTableListByPageDTO")
	public R getListByPage(@RequestBody PhysicalDataTableDTO physicalDataTableDTO){
		iPhysicalValueTableService.selectPhysical( physicalDataTableDTO);
		return R.success("成功");
	}

/*
	@ApiLog("折线图")
	@GetMapping("/lineChart")
	@ApiOperationSupport(order = 4)
	@ApiOperation(value = "折线图", notes = "传入rawDataTableListByPageDTOe")
	public R<List<PhysicalDataTable> > getLineChart(PhysicalDataLineChartDTO physicalDataLineChartDTO){

		return R.data(iPhysicalDataTableService.getLineChart(physicalDataLineChartDTO));
	}
*/

}

